﻿using Hangfire;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.SignalR;

namespace WebAppHangfire.Service
{
    [EnableCors("MyPolicy")]
    public class GraphGenerationHub:Hub
    {
        public GraphGenerationHub()
        {
        }

        public long GetWaitingCount()
        {
            return JobStorage.Current.GetMonitoringApi()
                .EnqueuedCount("img-queue");
        }
    }
}
